package pl.edu.agh.lab2.sr.remoteInterfaces;

import java.rmi.Remote;
import java.rmi.RemoteException;

import pl.edu.agh.lab2.sr.beans.Field;
import pl.edu.agh.lab2.sr.beans.GameMap;
import pl.edu.agh.lab2.sr.beans.IPlayer;
import pl.edu.agh.lab2.sr.beans.InvalidGameStateException;
import pl.edu.agh.lab2.sr.beans.InvalidUserException;
import pl.edu.agh.lab2.sr.beans.GameResponses;

public interface IBattleshipGame extends Remote {

	int getId() throws RemoteException;

	void initMap(IPlayer player, GameMap map) throws RemoteException,
			InvalidUserException;

	void startGame(IPlayer player) throws RemoteException,
			InvalidGameStateException, InvalidUserException;

	GameResponses move(IPlayer player, Field field) throws RemoteException,
			InvalidUserException, InvalidGameStateException;

	void join(IPlayer player2, IServerListener listener2)
			throws RemoteException, InvalidUserException,
			InvalidGameStateException;

	String getInfoAboutGame() throws RemoteException;

	IPlayer getPlayer1() throws RemoteException;

	IPlayer getPlayer2() throws RemoteException;

	GameMap getMap(IPlayer player) throws RemoteException, InvalidUserException;

}
